package com.example.demo.dao;

import java.io.Serializable;

import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

/**
 * 分页请求实现
 * 
 * @author jqlin
 *
 */
public class PageRequestWrapper extends PageRequest
        implements Pageable, Serializable {

    public PageRequestWrapper(int pageNum, int pageSize) {
        super(pageNum - 1, pageSize);
    }

    @Override
    public int getPageNumber() {
        return super.getPageNumber() + 1;
    }
}